export default class Food{
    element:HTMLElement
    constructor(){
        this.element = document.getElementById('food') as HTMLElement
    }

    change(){
        this.element.style.left = Math.ceil(Math.random() * 29) * 10 + 'px'
        this.element.style.top = Math.ceil(Math.random() * 29) * 10 + 'px'
    }
    get foodX(){
        return this.element.offsetLeft;
    }
    get foodY(){
        return this.element.offsetTop;
    }
}